<template>
    <view class="gjl-view">
        <view class="main">
            <mSetimg ref="setimg"></mSetimg>
            <image :src="imgsrc" mode=""></image>
        </view>
    </view>
</template>

<script>
    import mSetimg from '@/components/m-setimg/m-setimg.vue'

    export default {
        components: {
            mSetimg
        },
        data() {
            return {
                imgList: [],
                imgsrc: ''
            }
        },
        onLoad(item) {
            this.initImgData()
            this.haibaostr()
        },
        methods: {
            initImgData() {
                var pages = getCurrentPages() //获取加载的页面
                var currentPage = pages[pages.length - 1] //获取当前页面的对象
                var url = currentPage.route //当前页面url
                var options = currentPage.options //如果要获取url中所带的参数可以查看options  
                console.log(url, options)
                let imgList = []
            },
            haibaostr() {
                setTimeout(() => {
                    let ImgData = {
                        imgList: [{
                            u: 'https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1583569681&di=9470401a5f06778100e504d215c8dafd&src=http://a3.att.hudong.com/68/61/300000839764127060614318218_950.jpg',
                            x: 0,
                            y: 0,
                            h: 1334,
                            w: 750
                        }],
                        textList: []
                    }
                    this.$refs.setimg.haibao(ImgData, (res) => {
                        console.log(res,'返回值');
                        this.imgsrc = res;
                    })
                }, 200)
            },
        }
    }
</script>

<style scoped lang="scss">

</style>
